#ifndef INHERIT_H
#define INHERIT_H
#include <string>
#include <sstream>

using namespace std;

class Inherit
{
public:
    Inherit();
};

class Parent
{
    int mv;
public:
    void method()
    {

    }
};

class Child : public Parent
{

};

/*父类*/
class Object
{
protected:
    string mName;
    string mInfo;
public:
    Object();

    string name();

    string info();
};

class Point : public Object
{
private:
    int mX;
    int mY;
public:
    Point(int x = 0, int y = 0);

    int x();

    int y();
};

class Line : public Object
{
private:
    Point mP1;
    Point mP2;
public:
    Line(Point p1, Point p2);

    Point begin();

    Point end();
};

int inherit_main(void);

#endif // INHERIT_H
